import { post } from '@/utils/ajax';

// 查询部署管理列表
export function listInstance(query) {
    return post('/wf/manager/instance/search', query);
}
//终止
export function delInstance(processInstanceId) {
    return post('/wf/manager/instance/deleteById', { ids: processInstanceId })
}

// 查询实例节点完成情况
export function getProcessNode(processInstanceId, taskId){
    return post('/wf/task/todo/getProcessNode', { processInstanceId: processInstanceId, taskId: taskId })
}

// 减签
export function reduceTask(params){
    return post('/wf/manager/instance/reduceTask', params)
}

// 是否可升级
export function isEnableUpgrade(processInstanceId){
    return post('/wf/manager/instance/isEnableUpgrade', {processInstanceId})
}

// 根据流程实例id升级流程实例到最新版本
export function upgradeWfInstanceByProcessInstanceId(processInstanceId){
    return post('/wf/manager/instance/upgradeWfInstanceByProcessInstanceId', {processInstanceId})
}
